package com.shuma.auth.controller;

import com.shuma.auth.entity.RestBean;
import com.shuma.auth.model.dto.ProxyUserInfoDto;
import com.shuma.auth.model.dto.QueryProxyUserParams;
import com.shuma.auth.service.UserProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 管理人（运营或代理人）和商品的关联 前端控制器
 * </p>
 *
 * @author lele
 */
@Slf4j
@RestController
public class UserProductController {

    @Autowired
    private UserProductService userProductService;

    @PostMapping("user/selectProxyUser")
    public RestBean<List<ProxyUserInfoDto>> selectProxyUser(@RequestBody QueryProxyUserParams queryProxyUserParams){
        return userProductService.selectProxyUserByUsername(queryProxyUserParams);
    }

}
